const Router = require("@koa/router");
const router = new Router();
const {
  update,
  query
} = require('../controller/price')
// 查
router.post("/get", async (ctx) => {
  const { page, pageSize } = ctx.request.body
  ctx.body = await query({
    page,
    pageSize
  })
});
// 改
router.post("/:id", async (ctx, next) => {
  console.log(ctx.params.id)
  ctx.body = await update(ctx.request.body, ctx.params.id)
});
module.exports = router;
